package com.ferryman.web;

import com.ferryman.bean.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/7/5.
 */
@RestController
public class TestController {

    @GetMapping("/stuList")
    public List<Student> findStuList(){
        List<Student> stuList = new ArrayList<>();
        Student.Builder stu1 = Student.newBuilder();
        stu1.name("张三").age("21").gender("男").phone("12345679").build();
        Student.Builder stu2 = Student.newBuilder();
        stu2.name("李四").age("21").gender("妖").phone("12345679").build();
        Student.Builder stu3 = Student.newBuilder();
        stu3.name("王五").age("21").gender("女").phone("12345679").build();
        stuList.add(stu1.build());
        stuList.add(stu2.build());
        stuList.add(stu3.build());
        stuList.add(stu3.build());
        stuList.add(stu3.build());
        return stuList;
    }



}
